home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / INFO / DOSTIPS6.ZIP / DOSSCRN < prev    next >
Text File  |  1987-01-03  |  4KB  |  95 lines

  1.                         More Browse Power
  2.        (PC Magazine Vol 6 No 2 Jan 27, 1987 User-to-User)
  3.  
  4.      The FASTSCRN.BAS program in PC Mag Vol 5 No 17 October 14, 1986
  5. User-to-User for displaying screens rapidly was good, but there is an
  6. even easier way to accomplish the same thing.  Just copy the BROWSE.COM
  7. utility (PC Mag Vol 5 No 6 March 25, 1986 to another file named 
  8. DISPSCRN.COM and patch it by using DEBUG.COM:
  9.  
  10. A>DEBUG DISPSCRN.COM
  11. -E 02AC EB 37
  12. -W
  13. -Q
  14.  
  15.      Use any editor to create an ASCII text file (e.g., MENU.TXT) and
  16. display this text file with the command:
  17.  
  18. DISPSCRN MENU.TXT
  19.  
  20.      Although this method does not allow you to specify screen colors
  21. as part of the menu, it has the advantage of working directly with the
  22. text file instead of creating an additional .COM file.
  23.      To change a menu, you need only change the actual text in the
  24. file.  Since the program displays the end-of-file character as a right
  25. arrow, be sure to add a few extra carriage returns to the end of your
  26. text file so that it exceeds 25 lines.
  27.      The DISPSCRN program works exactly like the BROWSE command until
  28. the first screen has been displayed.  The patch inserts a JMP
  29. instruction at this point, and the program branches to the middle of
  30. the terminate sequence, closes the file, and returns control to DOS,
  31. dBASE, or wherever it was called from.
  32.      Editor's Note:  This will work, but it has several drawbacks.
  33. BROWSE.COM picks up the existing screen colors, so if you want
  34. different ones you have to run a short color-changing program
  35. beforehand.
  36.      PCCOLOR.BAS lets you choose your border, text, and background
  37. colors, and also lets you decide whether or not you would like to clear
  38. the screen before you set the colors.  PCCOLOR.BAS creates a short
  39. program called PCCOLOR.COM.  If you want different color clearing and
  40. setting versions, rename th old versions before you create the new.
  41.      Another drawback to this method is that DISPSCRN.COM leaves the
  42. cursor where it was when DOS executed it -- which means you may end up
  43. with a distracting blinking cursor halfway up the left edge of your
  44. screen.  You have to fill out the text file with carriage returns to
  45. avoid displaying CHR$(26)s.  And using it means you have to keep one
  46. more file on your disk in addition to the text files it displays.
  47.  
  48. 100 'PCCOLOR.BAS
  49. 110 'Creates PCCOLOR.COM with or without CLS feature
  50. 120 '
  51. 130 ' Setup
  52. 140 '
  53. 150 SCREEN 0:KEY OFF:COLOR 3,0,0:LOCATE ,,0:CLS:DIM C1$(40),C2$(36)
  54. 160 FOR A=1 TO 40:READ A$:C1$(A)=A$:NEXT
  55. 170 FOR A=1 TO 36:READ A$:C2$(A)=A$:NEXT
  56. 180 '
  57. 190 ' Ask which version to create
  58. 200 '
  59. 210 'PRINT TAB(18);"Do you want this to clear the screen (Y/N)? ";
  60. 220 'W$=INPUT$(1):IF INSTR("YyNn",W$)=0 THEN 220 ELSE PRINT W$:PRINT
  61. 230 '
  62. 240 ' Get inputs
  63. 250 '
  64. 260 COLOR 3:PRINT "FOR BORDER -- ";:GOSUB 510:BORD$=I$
  65. 270 COLOR 3:PRINT "(Anything higher than 7 will blink:)"
  66. 280 COLOR 3:PRINT "FOR BACKGROUND -- ";:GOSUB 510:BACK$=I$
  67. 290 COLOR 3:PRINT "FOR FOREGROUND (TEXT) -- ";:GOSUB 510
  68. 300 IF I$=BACK$ THEN BEEP:GOTO 290 ELSE FORE$=I$
  69. 310 '
  70. 320 ' Create file
  71. 330 '
  72. 340 OPEN "PCCOLOR.COM" AS 1 LEN=1:FIELD 1,1 AS B$
  73. 350 IF INSTR("Nn",W$) THEN 380
  74. 360 C1$(14)=BORD$:C1$(28)=BACK$+FORE$
  75. 370 FOR A=1 TO 40::LSET B$=CHR$(VAL("&H"+C1$(A))):PUT 1:NEXT:GOTO 400
  76. 380 C2$(6)=BORD$:C2$(23)=BACK$+FORE$
  77. 390 FOR A=1 TO 36::LSET B$=CHR$(VAL("&H"+C2$(A))):PUT 1:NEXT
  78. 400 PRINT "PCCOLOR.COM created.":CLOSE:END
  79. 410 '
  80. 420 ' DATA
  81. 430 '
  82. 440 DATA 29,C0,1E,50,B8,03,00,CD,10,B8,00,0B,BB,00,00,CD,10,B8,00,06
  83. 450 DATA B9,00,00,BA,50,20,B7,00,CD,10,B4,02,BA,00,00,B7,00,CD,10,CB
  84. 460 DATA B4,0B,B7,00,B3,00,CD,10,B8,00,B8,8E,D8,BE,00,00,B9,D0
  85. 470 DATA 07,C6,44,01,00,83,C6,02,49,85,C9,75,F4,B8,00,4C,CD,21
  86. 480 '
  87. 490 ' Input subroutine
  88. 500 '
  89. 510 COLOR 3,0:PRINT "Pick a color:  ";
  90. 520 COLOR 0,7:PRINT "0";:COLOR ,0:PRINT CHR$(32);
  91. 530 FOR A=1 TO 15:COLOR A,0:PRINT HEX$(A);CHR$(32);:NEXT:PRINT
  92. 540 I$=INPUT$(1):IF INSTR("0123456789ABCDEFabcdef",I$)=0 THEN 510
  93. 550 PRINT STRING$(80,196);:RETURN
  94.  
  95.